<div id="comment_form_block">
{% if user.is_authenticated %}
    <form method="post" name="comment_form" action="{% url 'comment_new' category=category recipient_id=recipient_id %}">
    {% csrf_token %}
    <div>
        {{ comment_form.text }}<br />
        {{ comment_form.text.errors }}
    </div>
    <input type="hidden" name="next" value="{{next}}" />
    <input type="submit" value="Leave Comment" />
    <span class="form_status">
        <span class="submitting">
            <img src="{{ STATIC_URL }}images/loading.gif" />
            Posting comment...
        </span>
        <span class="success good">Comment posted!</span>
        <span class="failure bad">Could not post comment.</span>
    </span>
    </form>
{% else %}
    Please <a href="{% url 'signin' %}?next={{next}}">Sign In</a> to post comments.
{% endif %}
</div>
